/*
 * Copyright © 2018 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

@import '~styles/variables.scss';

$index-column-width: 30px;
$dataset-name-column-width: 60%;
$field-name-bg-color: $grey-07;
$border: 1px solid $grey-06;
$text-color: $grey-01;
$grid-padding: 0 10px;
$row-height: 29px;
$dataset-hover-bg-color: $grey-08;
$field-hover-bg-color: white;
$header-bg-color: $grey-08;
$header-color: $grey-02;

.field-level-lineage-container .lineage-summary-empty-container {
  margin-top: 100px;
  font-size: 16px;
  text-align: center;
}

.field-level-lineage-container .lineage-summary-container {
  .lineage-fields {
    .lineage-row {
      display: flex;
      border-bottom: $border;

      > div {
        padding: $grid-padding;
        line-height: $row-height;
      }

      .index { width: $index-column-width; }
      .dataset-name {
        width: $dataset-name-column-width;
      }

      .field-name {
        width: calc(100% - #{$index-column-width} - #{$dataset-name-column-width});
      }
    }

    .lineage-fields-header {
      background-color: $header-bg-color;
      color: $header-color;
    }

    .lineage-fields-body {
      .summary-row:hover { background-color: $dataset-hover-bg-color; }

      .field-name,
      .dataset-name {
        padding: 0;
      }

      .field-name .field-row {
        &:not(:last-child) { border-bottom: $border; }
        &:hover { background-color: $field-hover-bg-color; }
      }

      .field-link {
        color: $text-color;
        padding: $grid-padding;
        display: inline-block;
        width: 100%;
        height: 100%;

        &:hover { text-decoration: none; }
      }
    }
  }
}
